A system having one or more processors may include debug resources to facilitate debugging of the system. For example, a system on a chip (SOC) may include debug resources integrated on the chip to facilitate debugging. The debug resources may include a trace source that provides a trace output of code execution and/or data in a processor for monitoring the operation of the processor. An operator may connect an external debugger to the system to control the trace source and view the trace output of the trace source. The external debugger can program the trace source through a debug access port (DAP) in the system and receive the trace output of the trace source through a trace port. For example, the external debugger can program the trace source to trace a particular program routine executed by the processor to debug the program routine.
When a system is reset (e.g., power on reset), a processor in the system may immediately start running after the reset is released. To properly debug the system in this case, the debugger typically has to gain control of the processor to temporarily halt operation of the processor so that the debugger has time to program the debug resources, which may be difficult for the debugger to do.